import request from '@/utils/request'

export async function getArticleListApi(
  params?: ArticleListParams
): Promise<ResponseData<ArticleListItem>> {
  return request({
    url: '/article/list',
    method: 'get',
    params
  })
}

export async function getArticleDetailApi(id: string): Promise<ResponseData<Article>> {
  return request({
    url: '/article/getArticle/' + id,
    method: 'get'
  })
}
